package de.hs_fulda.SoftComputing.Gogol.Wasserkraft;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.HeadlessException;
import javax.swing.ImageIcon;

import javax.swing.JApplet;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JSlider;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class WasserkraftApplet extends JApplet {
  	WasserkraftFuzzyController fuzzy;
  	PresentationController present;
  	
	public WasserkraftApplet() throws HeadlessException {
		fuzzy = new WasserkraftFuzzyController(getClass().getClassLoader().getResourceAsStream("de/hs_fulda/SoftComputing/Gogol/Wasserkraft/FCL/wasserkraft.fcl"));
		
	}
	//Called when this applet is loaded into the browser.
    public void init() {
      //Execute a job on the event-dispatching thread; creating this applet's GUI.
      try {
          SwingUtilities.invokeAndWait(new Runnable() {
              public void run() {
        	present = new PresentationController(getContentPane(), fuzzy);  
      		present.createGui();  
              }
          });
      } catch (Exception e) {
          System.err.println("createGUI didn't complete successfully");
      }
    }
}
